<!DOCTYPE html>
<!-- saved from url=(0045)http://www.jq22.com/demo/boMover201711110900/ -->
<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>背景随鼠标位置移动</title>
  <link rel="stylesheet" href="./index_files/bgMove.css">
  <style>
    #move {
      background: url(images/bg1.png);
    }
  </style>

  <script src="./index_files/bgMove.js"></script>
  <script>
    bgMove({
      jump: 1,  //移动速度,非必须可省略,默认为10
      bgImgurl: "images/bg1.png" //背景图片的位置,就是中html图片路径,必须不可省略
    })
  </script>

</head>

<body>
  <h3 style="text-align: center">左右滑动鼠标查看效果</h3>
  <div id="move" style="background-position-x: 0px;">
    <div id="moveL"></div>
    <div id="moveR"></div>
  </div>

</body>

</html>